package cn.example.zjgsu.dao;

import cn.example.zjgsu.pojo.FoodRecord;
import cn.example.zjgsu.pojo.result.ResultMFR;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface FoodRecordMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(FoodRecord record);

    FoodRecord selectByPrimaryKey(Integer id);

    List<FoodRecord> selectAll();

    int updateByPrimaryKey(FoodRecord record);

    List<FoodRecord> selectByUserId(String userId);

    List<ResultMFR> getTheCityFoodRecord(Integer cityid);

    List<ResultMFR> getTheBestFoodRecord();

    List<ResultMFR> getBriefFoodRecordByUserId(String userid);

    int updatePraisenumberById(Integer id);

    List<ResultMFR> getRecommendFoodRecordByCityID(Integer id);

    ResultMFR  getBriefFoodRecordById(Integer id);

    int updateViewnumberById(Integer id);

    List<ResultMFR> furryQueryFoodRecord(@Param("name") String foodrecordname);
}